package com.jerry.springboot.controller;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.jerry.springboot.pojo.ImoocJsonResult;
import com.jerry.springboot.pojo.Resource;

@RestController
@RequestMapping("/resource")
public class TestResourceController {

	@Autowired
	private Resource resource;
	
	@RequestMapping("/getResource")
	public ImoocJsonResult getResource() {
		
		Resource bean = new Resource();
		BeanUtils.copyProperties(resource, bean);
		
		return ImoocJsonResult.ok(bean);
	}
}
